#include <iostream>
#include "tcpserver.hpp"
#include <memory>

void Usge(char* proc)
{
    std::cout<<"Usage:\t"<<proc<<" serverport"<<std::endl;
}

int main(int argc,char* argv[])
{

    if(argc!=2)
    {
        Usge(argv[0]);
        exit(-1);
    }
    uint16_t serverport = std::stoi(argv[1]);
    std::unique_ptr<TcpServer> tsvr = make_unique<TcpServer>(serverport);
    tsvr->InitServer();
    tsvr->Loop();

    return 0;
}